package com.fqgj.sentry.policy.server;


import com.fqgj.sentry.policy.client.FunColumnService;
import com.fqgj.sentry.policy.dao.PcFunctionColumnDao;
import com.fqgj.sentry.policy.entity.PcFunctionColumnEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by zwh @yuntu-inc.com
 *
 * @description
 * @create 2017/7/29 0029 上午 11:46
 */
@Service
public class FunColumnServiceImpl implements FunColumnService {

    @Autowired
    private PcFunctionColumnDao functionColumnDao;

    @Override
    public List<PcFunctionColumnEntity> findByFunctionId(Long functionId) {
        return functionColumnDao.findByFunctionId(functionId);
    }

    @Override
    public PcFunctionColumnEntity save(PcFunctionColumnEntity entity) {
        return functionColumnDao.insert(entity);
    }

    @Override
    public Boolean deleteByFunctionId(Long functionId) {
        return functionColumnDao.deleteByFunctionId(functionId);
    }
}
